<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>use js</title>

    <!-- <head> 中的 JavaScript 函数 -->
    <script type="text/javascript">

        alert("Hi");

        function clickBtn() {
            document.getElementById("demo").innerHTML = "My First JavaScript Function";
        }
    </script>

</head>
<body>

    <p id="demo">A Paragraph</p>
    <button type="button" onclick="clickBtn()">Click</button>
    <br>

</body>
</html>